# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pylibpcap
_pkgname=pylibpcap
pkgver=0.6.4
pkgrel=4
pkgdesc='Python module for the libpcap packet capture library, based on the original python libpcap module by Aaron Rhodes.'
url='http://pylibpcap.sourceforge.net/'
license=('BSD')
arch=('x86_64' 'aarch64')
depends=('python2' 'libpcap')
source=("https://downloads.sourceforge.net/project/pylibpcap/$_pkgname/$pkgver/$_pkgname-$pkgver.tar.gz")
sha512sums=('5db891bc044065ea72fb24f800adcdc1c80280a95a169f241a926b65ecff9b2cddc8cca1f2210bdd3fa01f4bc358a696eab93438d49b2eea10a22b6afc4ca468')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

